import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
    public static void main(String arg[]) throws IOException {
        ServerSocket server = new ServerSocket(3636);
        Socket sock=server.accept();
        FileInputStream in=new FileInputStream("D:\\a\\abc.html");
        OutputStream out = sock.getOutputStream();
        int len=0;
        byte buffer[]=new byte[1024];
        while ((len=in.read(buffer))>0){
            out.write(buffer,0,len);
            System.out.println("qqqq");
        }
        in.close();
        out.close();
        sock.close();
        server.close();

//        while (true);
    }





}
